import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        /* 番茄钟 */ 
        isRuning: false,
        taskduringTime: 0,  // 任务持续时间
        hasProcessTime: 0,  // 任务真正耗时
        /* 闹钟 */ 
        currentDate: '',  // 闹钟当前时间 00：00
    },
    mutations: {
        set_isRuning: (state, value)=>{
            state.isRuning = value;
        },
        set_taskduringTime: (state, value)=>{
            state.taskduringTime = value;
        },
        set_hasProcessTime: (state, value)=>{
            state.hasProcessTime = value;
        },
        set_currentDate: (state, value)=>{
            state.currentDate = value;
        },
    }
})

export default store